package com.blogsystem.entity;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;

/**
 * 评论实体类，对应数据库表 comment
 */
@Data
@TableName("comment")
public class Comment {
    /**
     * 评论ID，主键自增
     */
    @TableId(type = IdType.AUTO)
    private Integer commentId;

    /**
     * 关联的文章ID
     */
    private Integer articleId;

    /**
     * 评论用户的ID
     */
    private Integer userId;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 评论创建时间
     */
    private LocalDateTime createTime;

    @TableField(exist = false)
    private String username;

    /**
     * 最后一次更新时间
     */
    private LocalDateTime updateTime;

    public Integer getCommentId() {
        return commentId;
    }

    public void setCommentId(Integer commentId) {
        this.commentId = commentId;
    }

    public Integer getArticleId() {
        return articleId;
    }

    public void setArticleId(Integer articleId) {
        this.articleId = articleId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

} 